# **********************************************************************
#
# Copyright (c) 2003-2008 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# **********************************************************************

# Ice version 3.3.0
# Generated from file `channel.ice'

import Ice, IcePy, __builtin__

# Start of module asterisk
_M_asterisk = Ice.openModule('asterisk')
__name__ = 'asterisk'

# Start of module asterisk.type
_M_asterisk.type = Ice.openModule('asterisk.type')
__name__ = 'asterisk.type'

# Start of module asterisk.type.basic
_M_asterisk.type.basic = Ice.openModule('asterisk.type.basic')
__name__ = 'asterisk.type.basic'

if not _M_asterisk.type.basic.__dict__.has_key('cdr'):
    _M_asterisk.type.basic.cdr = Ice.createTempClass()
    class cdr(object):
        def __init__(self, src='', dst='', billsec=0, duration=0):
            self.src = src
            self.dst = dst
            self.billsec = billsec
            self.duration = duration

        def __hash__(self):
            _h = 0
            _h = 5 * _h + __builtin__.hash(self.src)
            _h = 5 * _h + __builtin__.hash(self.dst)
            _h = 5 * _h + __builtin__.hash(self.billsec)
            _h = 5 * _h + __builtin__.hash(self.duration)
            return _h % 0x7fffffff

        def __cmp__(self, other):
            if other == None:
                return 1
            if self.src < other.src:
                return -1
            elif self.src > other.src:
                return 1
            if self.dst < other.dst:
                return -1
            elif self.dst > other.dst:
                return 1
            if self.billsec < other.billsec:
                return -1
            elif self.billsec > other.billsec:
                return 1
            if self.duration < other.duration:
                return -1
            elif self.duration > other.duration:
                return 1
            return 0

        def __str__(self):
            return IcePy.stringify(self, _M_asterisk.type.basic._t_cdr)

        __repr__ = __str__

    _M_asterisk.type.basic._t_cdr = IcePy.defineStruct('::asterisk::type::basic::cdr', cdr, (), (
        ('src', (), IcePy._t_string),
        ('dst', (), IcePy._t_string),
        ('billsec', (), IcePy._t_long),
        ('duration', (), IcePy._t_long)
    ))

    _M_asterisk.type.basic.cdr = cdr
    del cdr

if not _M_asterisk.type.basic.__dict__.has_key('channel'):
    _M_asterisk.type.basic.channel = Ice.createTempClass()
    class channel(object):
        def __init__(self, name='', exten='', cdr=_M_asterisk.type.basic.cdr(), bridged=''):
            self.name = name
            self.exten = exten
            self.cdr = cdr
            self.bridged = bridged

        def __hash__(self):
            _h = 0
            _h = 5 * _h + __builtin__.hash(self.name)
            _h = 5 * _h + __builtin__.hash(self.exten)
            _h = 5 * _h + __builtin__.hash(self.cdr)
            _h = 5 * _h + __builtin__.hash(self.bridged)
            return _h % 0x7fffffff

        def __cmp__(self, other):
            if other == None:
                return 1
            if self.name < other.name:
                return -1
            elif self.name > other.name:
                return 1
            if self.exten < other.exten:
                return -1
            elif self.exten > other.exten:
                return 1
            if self.cdr < other.cdr:
                return -1
            elif self.cdr > other.cdr:
                return 1
            if self.bridged < other.bridged:
                return -1
            elif self.bridged > other.bridged:
                return 1
            return 0

        def __str__(self):
            return IcePy.stringify(self, _M_asterisk.type.basic._t_channel)

        __repr__ = __str__

    _M_asterisk.type.basic._t_channel = IcePy.defineStruct('::asterisk::type::basic::channel', channel, (), (
        ('name', (), IcePy._t_string),
        ('exten', (), IcePy._t_string),
        ('cdr', (), _M_asterisk.type.basic._t_cdr),
        ('bridged', (), IcePy._t_string)
    ))

    _M_asterisk.type.basic.channel = channel
    del channel

# End of module asterisk.type.basic

__name__ = 'asterisk.type'

# Start of module asterisk.type.comp
_M_asterisk.type.comp = Ice.openModule('asterisk.type.comp')
__name__ = 'asterisk.type.comp'

# Start of module asterisk.type.comp.list
_M_asterisk.type.comp.list = Ice.openModule('asterisk.type.comp.list')
__name__ = 'asterisk.type.comp.list'

if not _M_asterisk.type.comp.list.__dict__.has_key('_t_channel'):
    _M_asterisk.type.comp.list._t_channel = IcePy.defineSequence('::asterisk::type::comp::list::channel', (), _M_asterisk.type.basic._t_channel)

# End of module asterisk.type.comp.list

__name__ = 'asterisk.type.comp'

# End of module asterisk.type.comp

__name__ = 'asterisk.type'

# End of module asterisk.type

__name__ = 'asterisk'

# Start of module asterisk.bridge
_M_asterisk.bridge = Ice.openModule('asterisk.bridge')
__name__ = 'asterisk.bridge'

if not _M_asterisk.bridge.__dict__.has_key('channel'):
    _M_asterisk.bridge.channel = Ice.createTempClass()
    class channel(Ice.Object):
        def __init__(self):
            if __builtin__.type(self) == _M_asterisk.bridge.channel:
                raise RuntimeError('asterisk.bridge.channel is an abstract class')

        def ice_ids(self, current=None):
            return ('::Ice::Object', '::asterisk::bridge::channel')

        def ice_id(self, current=None):
            return '::asterisk::bridge::channel'

        def ice_staticId():
            return '::asterisk::bridge::channel'
        ice_staticId = staticmethod(ice_staticId)

        #
        # Operation signatures.
        #
        # def getbyname(self, name, current=None):
        # def getbyexten(self, exten, current=None):
        # def get(self, current=None):

        def __str__(self):
            return IcePy.stringify(self, _M_asterisk.bridge._t_channel)

        __repr__ = __str__

    _M_asterisk.bridge.channelPrx = Ice.createTempClass()
    class channelPrx(Ice.ObjectPrx):

        def getbyname(self, name, _ctx=None):
            return _M_asterisk.bridge.channel._op_getbyname.invoke(self, ((name, ), _ctx))

        def getbyexten(self, exten, _ctx=None):
            return _M_asterisk.bridge.channel._op_getbyexten.invoke(self, ((exten, ), _ctx))

        def get(self, _ctx=None):
            return _M_asterisk.bridge.channel._op_get.invoke(self, ((), _ctx))

        def checkedCast(proxy, facetOrCtx=None, _ctx=None):
            return _M_asterisk.bridge.channelPrx.ice_checkedCast(proxy, '::asterisk::bridge::channel', facetOrCtx, _ctx)
        checkedCast = staticmethod(checkedCast)

        def uncheckedCast(proxy, facet=None):
            return _M_asterisk.bridge.channelPrx.ice_uncheckedCast(proxy, facet)
        uncheckedCast = staticmethod(uncheckedCast)

    _M_asterisk.bridge._t_channelPrx = IcePy.defineProxy('::asterisk::bridge::channel', channelPrx)

    _M_asterisk.bridge._t_channel = IcePy.defineClass('::asterisk::bridge::channel', channel, (), True, None, (), ())
    channel.ice_type = _M_asterisk.bridge._t_channel

    channel._op_getbyname = IcePy.Operation('getbyname', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (((), IcePy._t_string),), (), _M_asterisk.type.basic._t_channel, ())
    channel._op_getbyexten = IcePy.Operation('getbyexten', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (((), IcePy._t_string),), (), _M_asterisk.type.basic._t_channel, ())
    channel._op_get = IcePy.Operation('get', Ice.OperationMode.Normal, Ice.OperationMode.Normal, False, (), (), (), _M_asterisk.type.comp.list._t_channel, ())

    _M_asterisk.bridge.channel = channel
    del channel

    _M_asterisk.bridge.channelPrx = channelPrx
    del channelPrx

# Start of module asterisk.bridge.sip
_M_asterisk.bridge.sip = Ice.openModule('asterisk.bridge.sip')
__name__ = 'asterisk.bridge.sip'

if not _M_asterisk.bridge.sip.__dict__.has_key('channel'):
    _M_asterisk.bridge.sip.channel = Ice.createTempClass()
    class channel(Ice.Object):
        def __init__(self):
            if __builtin__.type(self) == _M_asterisk.bridge.sip.channel:
                raise RuntimeError('asterisk.bridge.sip.channel is an abstract class')

        def ice_ids(self, current=None):
            return ('::Ice::Object', '::asterisk::bridge::sip::channel')

        def ice_id(self, current=None):
            return '::asterisk::bridge::sip::channel'

        def ice_staticId():
            return '::asterisk::bridge::sip::channel'
        ice_staticId = staticmethod(ice_staticId)

        def __str__(self):
            return IcePy.stringify(self, _M_asterisk.bridge.sip._t_channel)

        __repr__ = __str__

    _M_asterisk.bridge.sip.channelPrx = Ice.createTempClass()
    class channelPrx(Ice.ObjectPrx):

        def checkedCast(proxy, facetOrCtx=None, _ctx=None):
            return _M_asterisk.bridge.sip.channelPrx.ice_checkedCast(proxy, '::asterisk::bridge::sip::channel', facetOrCtx, _ctx)
        checkedCast = staticmethod(checkedCast)

        def uncheckedCast(proxy, facet=None):
            return _M_asterisk.bridge.sip.channelPrx.ice_uncheckedCast(proxy, facet)
        uncheckedCast = staticmethod(uncheckedCast)

    _M_asterisk.bridge.sip._t_channelPrx = IcePy.defineProxy('::asterisk::bridge::sip::channel', channelPrx)

    _M_asterisk.bridge.sip._t_channel = IcePy.defineClass('::asterisk::bridge::sip::channel', channel, (), True, None, (), ())
    channel.ice_type = _M_asterisk.bridge.sip._t_channel

    _M_asterisk.bridge.sip.channel = channel
    del channel

    _M_asterisk.bridge.sip.channelPrx = channelPrx
    del channelPrx

# End of module asterisk.bridge.sip

__name__ = 'asterisk.bridge'

# End of module asterisk.bridge

__name__ = 'asterisk'

# End of module asterisk
